#./thirdparty/sqlite3/Makefile
SOURCES = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
OBJSD = $(addprefix $(TMP_DIR)sqlite3/,$(OBJS))

INCLUDE = -I ./

all:chkdir sqlite3$(TAGTYPE)

chkdir:
	$(shell mkdir -p $(TMP_DIR)sqlite3/)

sqlite3_static:$(OBJS)
	$(AR) $(OUT_DIR)sqlite3.a $(OBJSD)

sqlite3_shared:$(OBJS)
	$(CC) -shared -fPIC $(OBJSD) -o $(OUT_DIR)sqlite3.so

$(OBJS):%.o:%.c
	$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $(TMP_DIR)sqlite3/$@

clean:
	rm -rf $(TMP_DIR)sqlite3/*.o